<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Code Editor Test</title></head>
<body>
<h1>Crunchy Editor Test</h1>
<p>Crunchy allows embedding a number of <b>independent</b> editors in a single page.
Try running the code by pressing the "execute" button at the bottom.</p>
<pre title="editor">
a = 7*6
print a
</pre>
<p>You may also want to toggle the editor from a simple textarea into
a syntax aware editor.  The more complex editor can save and load Python scripts.</p>
<p>A second editor (with code preceded by line numbers) is provided below.  Try it out and verify that the variable <code>a</code> is
not defined, thus confirming that each editor is running code independently from the others.</p>
<pre title="editor linenumber">
for i in range(5):
    print i,
print 
print a
</pre>
<p>Finally, code from a simulated interpreter session can be extracted and copied into an editor.  Try out the following simple example.</p>
<pre title="editor">
&gt;&gt;&gt; x = 7*6
&gt;&gt;&gt; print x
42
&gt;&gt;&gt; range(5)
[0, 1, 2, 3, 4]
&gt;&gt;&gt; for y in range(5):
...     print y,
... 
0 1 2 3 4
</pre>
<p>If you toggle the editor, you may want to try to:
</p><ul><li>save a file; you need to browse to the desired location and click on the file name (or some other file, and then edit the result) to get the path correctly.</li>
<li>load a file, again using the browsing utility.</li>
<li>save and run a file as an external program.</li>
</ul>
<h2>Bugs</h2>
<ul>
  <li> There are no known bugs.</li>
</ul>

<p><a href="index.html">Back to the test index</a></p>
</body>
</html>
